1. Field
The present disclosure relates to an application testing device and method. In particular, the present disclosure relates to an Android automated cross-application testing device and method.
2. Description of the Related Art
Android is a Linux-based open-source operating system, which is mainly used in portable devices. At present, there is a testing framework called “Instrumentation” in Android, which is an automated testing tool that has no graphical interface, has starting capability, and is designed to monitor other tested applications. The testing framework starts up a set of tests mainly by means of command line (e.g., adb shell), and provides the test results in the form of command line. The main working principle of the testing framework is as follows: Instrumentation is in active state when applications run; Instrumentation is initialized before any application runs, which can be used to monitor the interaction between the system and applications. Instrumentation starts up the tests by means of command line (e.g., adb shell). If the tested application has started up and exists in the memory, Instrumentation will kill the tested application, and then restart the tested application. Thus, Instrumentation coexists with the tested application in the same process, and thereby attains the purpose of manipulating and monitoring the tested application.
Though the testing application can control applications accurately in the Instrumentation framework, when the tested primary application invokes a secondary application in the test, the Instrumentation object cannot manipulate or monitor the secondary application because the secondary application is not in the same process as the primary application after the secondary application is started up. In other words, the Instrumentation framework does not support cross-application testing.